package com.hx.er.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.hx.er.bean.base.UserBean;
import com.hx.er.bean.detail.UserDetailBean;
import com.hx.er.common.entity.LoginInfoEntity;
import com.hx.er.dao.IUserDao;
import com.hx.er.mapper.IUserMapper;

public class UserDaoImpl implements IUserDao {
	@Autowired
	private IUserMapper userMapper;

	@Override
	public List<UserDetailBean> getUserDetailList(Map<String, Object> conditions) {
		return this.userMapper.getUserDetailList(conditions);
	}

	@Override
	public int getUserDetailCount(Map<String, Object> conditions) {
		return this.userMapper.getUserDetailCount(conditions);
	}

	@Override
	public void insertCustomerWithoutId(UserBean userBean) {
		this.userMapper.insertUserWithoutId(userBean);
	}

	@Override
	public int checkUserName(UserBean userBean) {
		return this.userMapper.checkUserName(userBean);
	}

	@Override
	public UserBean getUserAliveById(long userId) {
		return this.userMapper.getUserAliveById(userId);
	}

	@Override
	public int updateUserInfo(UserBean userBean) {
		return this.userMapper.updateUserInfo(userBean);
	}
	
	@Override
	public int updateUserPassword(Map<String, Object> params) {
		return this.userMapper.updateUserPassword(params);
	}

	@Override
	public int checkMobile(UserBean userBean) {
		return this.userMapper.checkMobile(userBean);
	}

	@Override
	public int checkMail(UserBean userBean) {
		return this.userMapper.checkMail(userBean);
	}

	@Override
	public UserBean getUserAlive(UserBean userBean) {
		return this.userMapper.getUserAlive(userBean);
	}

	@Override
	public UserBean getManagerByRestId(long restId) {
		return this.userMapper.getManagerByRestId(restId);
	}

	@Override
	public void insertLoginInfoWithoutId(LoginInfoEntity loginInfoEntity) {
		this.userMapper.insertLoginInfoWithoutId(loginInfoEntity);
	}

	@Override
	public List<LoginInfoEntity> getLoginInfoList(LoginInfoEntity loginInfoEntity) {
		return this.userMapper.getLoginInfoList(loginInfoEntity);
	}
}
